import java.util.Scanner;
import java.util.Arrays;
public class Test {
    public static void main(String[] args) {
        int[] arr={1,2,34,3,4,5,7,23,12};
        int f=0;
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]%2!=0){
                f++;
            }else{
                f=0;
            }
            if(f==3){
                System.out.println("true");
                return;
            }
        }
        System.out.println("true");
    }
    public static void main5(String[] args) {
        int[] arr= {2, 2, 1, 1, 1, 2, 2};
        Arrays.sort(arr);
        System.out.println(arr[arr.length/2]);
    }
    public static void main4(String[] args) {
        int[] arr={4,1,2,1,2};
        int t=0;
        for(int i=0;i<arr.length;i++){
            t=t^arr[i];
        }
        System.out.println(t);
    }
    public static void main3(String[] args) {
        int[] nums={2,7,11,15};
        int targets=9;
        for (int i=0;i<nums.length;i++){
            for (int j = i+1; j < nums.length; j++) {
                if(nums[i]+nums[j]==targets){
                    System.out.println("["+i+","+j+"]");
                    return;
                }
            }
        }
    }
    public static void main2(String[] args) {
        int[] array ={9,8,7,6,5,44,3,22};
        for(int i=0;i<array.length-1;i++){
            for(int j=0;j<array.length-1-i;j++){
                if (array[j] > array[j + 1]) {
                    int temp = array[j];
                    array[j] = array[j + 1];
                    array[j + 1] = temp;
                }
            }
        }
        for(int i=0;i<array.length;i++){
            System.out.print(array[i]+" ");
        }
    }
    public static void main1(String[] args) {
        int[] array = {1, 2, 3, 4, 5, 6, 7};
        int left = 0;
        int right = array.length - 1;
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入要查找的数字：");
        int flag = sc.nextInt();
        while (left < right) {
            int mid = (left + right) / 2;
            if (array[mid] > flag) {
                right = mid-1;
            } else if (array[mid] < flag) {
                left = mid+1;
            } else {
                System.out.println("已经找到");
                return;
            }
        }
        System.out.println("没有找到");
    }
}
